<?php
namespace app\index\controller;
use \app\commom\controller\Api;
use think\Db;
class Index extends Api
{
   
    
    public function index ()
    {
         
        $data = ['name'=>'thinkphp','url'=>'thinkphp.cn'];
         return ['data'=>$data,'code'=>1,'message'=>'操作完成'];
    }
    
    public function getApp()
    {
         $app = DB::name('setting')->field('v')->where(['k'=>'site'])->find();       
         $app = unserialize($app['v']);
         return $app;
    }
    
    public function  navigation(){
        
        $navigation = DB::name('navigation')->select();       
        return $navigation;
    } 
    
     public function hello($id) {
        return $id;
    }
}
